import { notFound } from "next/navigation"; import type { ReactNode } from "react"; import { api } from "@/lib/api"; /** Existence check outside the `loading.tsx` boundary so unknown clusters answer with a real 404 (see entity/[id]/layout.tsx). */ export default async function ClusterLayout({ params, children }: { params: Promise<{ slug: string }>; children: ReactNode }) { const { slug } = await params; const d = await api.cluster(slug); if (!d) notFound(); return children; }